3.454 \(\int \frac {(f+g x) (a+b \log (c x^n))}{(d+e x)^3} \, dx\)

Optimal. Leaf size=115 \[ -\frac {(f+g x)^2 \left (a+b \log \left (c x^n\right )\right )}{2 (d+e x)^2 (e f-d g)}-\frac {b n (d g+e f) \log (d+e x)}{2 d^2 e^2}+\frac {b f^2 n \log (x)}{2 d^2 (e f-d g)}+\frac {b n (e f-d g)}{2 d e^2 (d+e x)} \]

[Out]

1/2*b*(-d*g+e*f)*n/d/e^2/(e*x+d)+1/2*b*f^2*n*ln(x)/d^2/(-d*g+e*f)-1/2*(g*x+f)^2*(a+b*ln(c*x^n))/(-d*g+e*f)/(e*
x+d)^2-1/2*b*(d*g+e*f)*n*ln(e*x+d)/d^2/e^2

________________________________________________________________________________________

Rubi [A]  time = 0.15, antiderivative size = 151, normalized size of antiderivative = 1.31, number of steps used = 7, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {2357, 2319, 44, 2314, 31} \[ -\frac {(e f-d g) \left (a+b \log \left (c x^n\right )\right )}{2 e^2 (d+e x)^2}+\frac {g x \left (a+b \log \left (c x^n\right )\right )}{d e (d+e x)}+\frac {b n \log (x) (e f-d g)}{2 d^2 e^2}-\frac {b n (e f-d g) \log (d+e x)}{2 d^2 e^2}+\frac {b n (e f-d g)}{2 d e^2 (d+e x)}-\frac {b g n \log (d+e x)}{d e^2} \]

Antiderivative was successfully verified.

[In]

Int[((f + g*x)*(a + b*Log[c*x^n]))/(d + e*x)^3,x]

[Out]

(b*(e*f - d*g)*n)/(2*d*e^2*(d + e*x)) + (b*(e*f - d*g)*n*Log[x])/(2*d^2*e^2) - ((e*f - d*g)*(a + b*Log[c*x^n])
)/(2*e^2*(d + e*x)^2) + (g*x*(a + b*Log[c*x^n]))/(d*e*(d + e*x)) - (b*g*n*Log[d + e*x])/(d*e^2) - (b*(e*f - d*
g)*n*Log[d + e*x])/(2*d^2*e^2)

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 44

Int[((a_) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*
x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

Rule 2314

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_) + (e_.)*(x_)^(r_.))^(q_), x_Symbol] :> Simp[(x*(d + e*x^r)^(q
+ 1)*(a + b*Log[c*x^n]))/d, x] - Dist[(b*n)/d, Int[(d + e*x^r)^(q + 1), x], x] /; FreeQ[{a, b, c, d, e, n, q,
r}, x] && EqQ[r*(q + 1) + 1, 0]

Rule 2319

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[((d + e*x)^(q + 1
)*(a + b*Log[c*x^n])^p)/(e*(q + 1)), x] - Dist[(b*n*p)/(e*(q + 1)), Int[((d + e*x)^(q + 1)*(a + b*Log[c*x^n])^
(p - 1))/x, x], x] /; FreeQ[{a, b, c, d, e, n, p, q}, x] && GtQ[p, 0] && NeQ[q, -1] && (EqQ[p, 1] || (Integers
Q[2*p, 2*q] &&  !IGtQ[q, 0]) || (EqQ[p, 2] && NeQ[q, 1]))

Rule 2357

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[c*x^
n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, n}, x] && RationalFunctionQ[RFx, x] && IGtQ[p, 0]

Rubi steps

\begin {align*} \int \frac {(f+g x) \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^3} \, dx &=\int \left (\frac {(e f-d g) \left (a+b \log \left (c x^n\right )\right )}{e (d+e x)^3}+\frac {g \left (a+b \log \left (c x^n\right )\right )}{e (d+e x)^2}\right ) \, dx\\ &=\frac {g \int \frac {a+b \log \left (c x^n\right )}{(d+e x)^2} \, dx}{e}+\frac {(e f-d g) \int \frac {a+b \log \left (c x^n\right )}{(d+e x)^3} \, dx}{e}\\ &=-\frac {(e f-d g) \left (a+b \log \left (c x^n\right )\right )}{2 e^2 (d+e x)^2}+\frac {g x \left (a+b \log \left (c x^n\right )\right )}{d e (d+e x)}-\frac {(b g n) \int \frac {1}{d+e x} \, dx}{d e}+\frac {(b (e f-d g) n) \int \frac {1}{x (d+e x)^2} \, dx}{2 e^2}\\ &=-\frac {(e f-d g) \left (a+b \log \left (c x^n\right )\right )}{2 e^2 (d+e x)^2}+\frac {g x \left (a+b \log \left (c x^n\right )\right )}{d e (d+e x)}-\frac {b g n \log (d+e x)}{d e^2}+\frac {(b (e f-d g) n) \int \left (\frac {1}{d^2 x}-\frac {e}{d (d+e x)^2}-\frac {e}{d^2 (d+e x)}\right ) \, dx}{2 e^2}\\ &=\frac {b (e f-d g) n}{2 d e^2 (d+e x)}+\frac {b (e f-d g) n \log (x)}{2 d^2 e^2}-\frac {(e f-d g) \left (a+b \log \left (c x^n\right )\right )}{2 e^2 (d+e x)^2}+\frac {g x \left (a+b \log \left (c x^n\right )\right )}{d e (d+e x)}-\frac {b g n \log (d+e x)}{d e^2}-\frac {b (e f-d g) n \log (d+e x)}{2 d^2 e^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.18, size = 108, normalized size = 0.94 \[ \frac {-\frac {(e f-d g) \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^2}-\frac {2 g \left (a+b \log \left (c x^n\right )\right )}{d+e x}+\frac {b n (e f-d g) \left (\frac {d}{d+e x}-\log (d+e x)+\log (x)\right )}{d^2}+\frac {2 b g n (\log (x)-\log (d+e x))}{d}}{2 e^2} \]

Antiderivative was successfully verified.

[In]

Integrate[((f + g*x)*(a + b*Log[c*x^n]))/(d + e*x)^3,x]

[Out]

(-(((e*f - d*g)*(a + b*Log[c*x^n]))/(d + e*x)^2) - (2*g*(a + b*Log[c*x^n]))/(d + e*x) + (2*b*g*n*(Log[x] - Log
[d + e*x]))/d + (b*(e*f - d*g)*n*(d/(d + e*x) + Log[x] - Log[d + e*x]))/d^2)/(2*e^2)

________________________________________________________________________________________

fricas [B]  time = 0.85, size = 215, normalized size = 1.87 \[ -\frac {a d^{2} e f + a d^{3} g - {\left (b d^{2} e f - b d^{3} g\right )} n + {\left (2 \, a d^{2} e g - {\left (b d e^{2} f - b d^{2} e g\right )} n\right )} x + {\left ({\left (b e^{3} f + b d e^{2} g\right )} n x^{2} + 2 \, {\left (b d e^{2} f + b d^{2} e g\right )} n x + {\left (b d^{2} e f + b d^{3} g\right )} n\right )} \log \left (e x + d\right ) + {\left (2 \, b d^{2} e g x + b d^{2} e f + b d^{3} g\right )} \log \relax (c) - {\left (2 \, b d e^{2} f n x + {\left (b e^{3} f + b d e^{2} g\right )} n x^{2}\right )} \log \relax (x)}{2 \, {\left (d^{2} e^{4} x^{2} + 2 \, d^{3} e^{3} x + d^{4} e^{2}\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)*(a+b*log(c*x^n))/(e*x+d)^3,x, algorithm="fricas")

[Out]

-1/2*(a*d^2*e*f + a*d^3*g - (b*d^2*e*f - b*d^3*g)*n + (2*a*d^2*e*g - (b*d*e^2*f - b*d^2*e*g)*n)*x + ((b*e^3*f
+ b*d*e^2*g)*n*x^2 + 2*(b*d*e^2*f + b*d^2*e*g)*n*x + (b*d^2*e*f + b*d^3*g)*n)*log(e*x + d) + (2*b*d^2*e*g*x +
b*d^2*e*f + b*d^3*g)*log(c) - (2*b*d*e^2*f*n*x + (b*e^3*f + b*d*e^2*g)*n*x^2)*log(x))/(d^2*e^4*x^2 + 2*d^3*e^3
*x + d^4*e^2)

________________________________________________________________________________________

giac [B]  time = 0.36, size = 252, normalized size = 2.19 \[ -\frac {b d g n x^{2} e^{2} \log \left (x e + d\right ) + 2 \, b d^{2} g n x e \log \left (x e + d\right ) - b d g n x^{2} e^{2} \log \relax (x) + b d^{2} g n x e + b d^{3} g n \log \left (x e + d\right ) + b f n x^{2} e^{3} \log \left (x e + d\right ) + 2 \, b d f n x e^{2} \log \left (x e + d\right ) + b d^{2} f n e \log \left (x e + d\right ) + 2 \, b d^{2} g x e \log \relax (c) - b f n x^{2} e^{3} \log \relax (x) - 2 \, b d f n x e^{2} \log \relax (x) + b d^{3} g n - b d f n x e^{2} - b d^{2} f n e + 2 \, a d^{2} g x e + b d^{3} g \log \relax (c) + b d^{2} f e \log \relax (c) + a d^{3} g + a d^{2} f e}{2 \, {\left (d^{2} x^{2} e^{4} + 2 \, d^{3} x e^{3} + d^{4} e^{2}\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)*(a+b*log(c*x^n))/(e*x+d)^3,x, algorithm="giac")

[Out]

-1/2*(b*d*g*n*x^2*e^2*log(x*e + d) + 2*b*d^2*g*n*x*e*log(x*e + d) - b*d*g*n*x^2*e^2*log(x) + b*d^2*g*n*x*e + b
*d^3*g*n*log(x*e + d) + b*f*n*x^2*e^3*log(x*e + d) + 2*b*d*f*n*x*e^2*log(x*e + d) + b*d^2*f*n*e*log(x*e + d) +
 2*b*d^2*g*x*e*log(c) - b*f*n*x^2*e^3*log(x) - 2*b*d*f*n*x*e^2*log(x) + b*d^3*g*n - b*d*f*n*x*e^2 - b*d^2*f*n*
e + 2*a*d^2*g*x*e + b*d^3*g*log(c) + b*d^2*f*e*log(c) + a*d^3*g + a*d^2*f*e)/(d^2*x^2*e^4 + 2*d^3*x*e^3 + d^4*
e^2)

________________________________________________________________________________________

maple [C]  time = 0.32, size = 624, normalized size = 5.43 \[ -\frac {\left (2 g x e +d g +e f \right ) b \ln \left (x^{n}\right )}{2 \left (e x +d \right )^{2} e^{2}}+\frac {2 i \pi b \,d^{2} e g x \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )-2 b \,d^{3} g \ln \relax (c )-2 b \,d^{3} g n -2 a \,d^{2} e f -2 a \,d^{3} g +2 b d \,e^{2} g n \,x^{2} \ln \left (-x \right )+4 b \,d^{2} e g n x \ln \left (-x \right )+4 b d \,e^{2} f n x \ln \left (-x \right )-2 b d \,e^{2} g n \,x^{2} \ln \left (e x +d \right )-4 b \,d^{2} e g n x \ln \left (e x +d \right )-4 b d \,e^{2} f n x \ln \left (e x +d \right )-2 b \,d^{2} e g n x +2 b d \,e^{2} f n x +2 b \,d^{3} g n \ln \left (-x \right )-2 b \,d^{3} g n \ln \left (e x +d \right )-2 b \,d^{2} e f \ln \relax (c )-4 a \,d^{2} e g x +2 b \,d^{2} e f n +2 b \,e^{3} f n \,x^{2} \ln \left (-x \right )+2 b \,d^{2} e f n \ln \left (-x \right )-2 b \,e^{3} f n \,x^{2} \ln \left (e x +d \right )-2 b \,d^{2} e f n \ln \left (e x +d \right )-4 b \,d^{2} e g x \ln \relax (c )+i \pi b \,d^{3} g \mathrm {csgn}\left (i c \,x^{n}\right )^{3}-2 i \pi b \,d^{2} e g x \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-2 i \pi b \,d^{2} e g x \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+i \pi b \,d^{2} e f \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )+2 i \pi b \,d^{2} e g x \mathrm {csgn}\left (i c \,x^{n}\right )^{3}+i \pi b \,d^{3} g \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )-i \pi b \,d^{2} e f \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-i \pi b \,d^{2} e f \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-i \pi b \,d^{3} g \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-i \pi b \,d^{3} g \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+i \pi b \,d^{2} e f \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{4 \left (e x +d \right )^{2} d^{2} e^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g*x+f)*(b*ln(c*x^n)+a)/(e*x+d)^3,x)

[Out]

-1/2*b*(2*e*g*x+d*g+e*f)/(e*x+d)^2/e^2*ln(x^n)+1/4*(-2*ln(c)*b*d^3*g-2*b*d^3*g*n-2*a*d^2*e*f-2*a*d^3*g+I*Pi*b*
d^3*g*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-I*Pi*b*d^2*e*f*csgn(I*x^n)*csgn(I*c*x^n)^2-I*Pi*b*d^2*e*f*csgn(I*c*x
^n)^2*csgn(I*c)+2*I*Pi*b*d^2*e*g*x*csgn(I*c*x^n)^3+2*I*Pi*b*d^2*e*g*x*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)+2*ln
(-x)*b*d*e^2*g*n*x^2+4*ln(-x)*b*d^2*e*g*n*x+4*ln(-x)*b*d*e^2*f*n*x-2*ln(e*x+d)*b*d*e^2*g*n*x^2-4*ln(e*x+d)*b*d
^2*e*g*n*x-4*ln(e*x+d)*b*d*e^2*f*n*x-I*Pi*b*d^3*g*csgn(I*x^n)*csgn(I*c*x^n)^2-2*I*Pi*b*d^2*e*g*x*csgn(I*x^n)*c
sgn(I*c*x^n)^2-2*I*Pi*b*d^2*e*g*x*csgn(I*c*x^n)^2*csgn(I*c)+I*Pi*b*d^2*e*f*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)
-2*b*d^2*e*g*n*x+2*b*d*e^2*f*n*x+2*ln(-x)*b*d^3*g*n-2*ln(e*x+d)*b*d^3*g*n-2*ln(c)*b*d^2*e*f-4*a*d^2*e*g*x+2*b*
d^2*e*f*n+2*ln(-x)*b*e^3*f*n*x^2+2*ln(-x)*b*d^2*e*f*n-2*ln(e*x+d)*b*e^3*f*n*x^2-2*ln(e*x+d)*b*d^2*e*f*n-4*ln(c
)*b*d^2*e*g*x-I*Pi*b*d^3*g*csgn(I*c*x^n)^2*csgn(I*c)+I*Pi*b*d^3*g*csgn(I*c*x^n)^3+I*Pi*b*d^2*e*f*csgn(I*c*x^n)
^3)/d^2/e^2/(e*x+d)^2

________________________________________________________________________________________

maxima [B]  time = 1.12, size = 218, normalized size = 1.90 \[ \frac {1}{2} \, b f n {\left (\frac {1}{d e^{2} x + d^{2} e} - \frac {\log \left (e x + d\right )}{d^{2} e} + \frac {\log \relax (x)}{d^{2} e}\right )} - \frac {1}{2} \, b g n {\left (\frac {1}{e^{3} x + d e^{2}} + \frac {\log \left (e x + d\right )}{d e^{2}} - \frac {\log \relax (x)}{d e^{2}}\right )} - \frac {{\left (2 \, e x + d\right )} b g \log \left (c x^{n}\right )}{2 \, {\left (e^{4} x^{2} + 2 \, d e^{3} x + d^{2} e^{2}\right )}} - \frac {{\left (2 \, e x + d\right )} a g}{2 \, {\left (e^{4} x^{2} + 2 \, d e^{3} x + d^{2} e^{2}\right )}} - \frac {b f \log \left (c x^{n}\right )}{2 \, {\left (e^{3} x^{2} + 2 \, d e^{2} x + d^{2} e\right )}} - \frac {a f}{2 \, {\left (e^{3} x^{2} + 2 \, d e^{2} x + d^{2} e\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)*(a+b*log(c*x^n))/(e*x+d)^3,x, algorithm="maxima")

[Out]

1/2*b*f*n*(1/(d*e^2*x + d^2*e) - log(e*x + d)/(d^2*e) + log(x)/(d^2*e)) - 1/2*b*g*n*(1/(e^3*x + d*e^2) + log(e
*x + d)/(d*e^2) - log(x)/(d*e^2)) - 1/2*(2*e*x + d)*b*g*log(c*x^n)/(e^4*x^2 + 2*d*e^3*x + d^2*e^2) - 1/2*(2*e*
x + d)*a*g/(e^4*x^2 + 2*d*e^3*x + d^2*e^2) - 1/2*b*f*log(c*x^n)/(e^3*x^2 + 2*d*e^2*x + d^2*e) - 1/2*a*f/(e^3*x
^2 + 2*d*e^2*x + d^2*e)

________________________________________________________________________________________

mupad [B]  time = 4.00, size = 174, normalized size = 1.51 \[ -\frac {a\,d\,g+a\,e\,f+\frac {x\,\left (2\,a\,d\,e\,g-b\,e^2\,f\,n+b\,d\,e\,g\,n\right )}{d}+b\,d\,g\,n-b\,e\,f\,n}{2\,d^2\,e^2+4\,d\,e^3\,x+2\,e^4\,x^2}-\frac {\ln \left (c\,x^n\right )\,\left (\frac {b\,f}{2\,e}+\frac {b\,d\,g}{2\,e^2}+\frac {b\,g\,x}{e}\right )}{d^2+2\,d\,e\,x+e^2\,x^2}-\frac {b\,n\,\mathrm {atanh}\left (\frac {b\,n\,\left (d\,g+e\,f\right )\,\left (d+2\,e\,x\right )}{d\,\left (b\,d\,g\,n+b\,e\,f\,n\right )}\right )\,\left (d\,g+e\,f\right )}{d^2\,e^2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((f + g*x)*(a + b*log(c*x^n)))/(d + e*x)^3,x)

[Out]

- (a*d*g + a*e*f + (x*(2*a*d*e*g - b*e^2*f*n + b*d*e*g*n))/d + b*d*g*n - b*e*f*n)/(2*d^2*e^2 + 2*e^4*x^2 + 4*d
*e^3*x) - (log(c*x^n)*((b*f)/(2*e) + (b*d*g)/(2*e^2) + (b*g*x)/e))/(d^2 + e^2*x^2 + 2*d*e*x) - (b*n*atanh((b*n
*(d*g + e*f)*(d + 2*e*x))/(d*(b*d*g*n + b*e*f*n)))*(d*g + e*f))/(d^2*e^2)

________________________________________________________________________________________

sympy [A]  time = 8.30, size = 1090, normalized size = 9.48 \[ \begin {cases} \tilde {\infty } \left (- \frac {a f}{2 x^{2}} - \frac {a g}{x} - \frac {b f n \log {\relax (x )}}{2 x^{2}} - \frac {b f n}{4 x^{2}} - \frac {b f \log {\relax (c )}}{2 x^{2}} - \frac {b g n \log {\relax (x )}}{x} - \frac {b g n}{x} - \frac {b g \log {\relax (c )}}{x}\right ) & \text {for}\: d = 0 \wedge e = 0 \\\frac {- \frac {a f}{2 x^{2}} - \frac {a g}{x} - \frac {b f n \log {\relax (x )}}{2 x^{2}} - \frac {b f n}{4 x^{2}} - \frac {b f \log {\relax (c )}}{2 x^{2}} - \frac {b g n \log {\relax (x )}}{x} - \frac {b g n}{x} - \frac {b g \log {\relax (c )}}{x}}{e^{3}} & \text {for}\: d = 0 \\\frac {a f x + \frac {a g x^{2}}{2} + b f n x \log {\relax (x )} - b f n x + b f x \log {\relax (c )} + \frac {b g n x^{2} \log {\relax (x )}}{2} - \frac {b g n x^{2}}{4} + \frac {b g x^{2} \log {\relax (c )}}{2}}{d^{3}} & \text {for}\: e = 0 \\- \frac {a d^{3} g}{2 d^{4} e^{2} + 4 d^{3} e^{3} x + 2 d^{2} e^{4} x^{2}} - \frac {a d^{2} e f}{2 d^{4} e^{2} + 4 d^{3} e^{3} x + 2 d^{2} e^{4} x^{2}} - \frac {2 a d^{2} e g x}{2 d^{4} e^{2} + 4 d^{3} e^{3} x + 2 d^{2} e^{4} x^{2}} - \frac {b d^{3} g n \log {\left (\frac {d}{e} + x \right )}}{2 d^{4} e^{2} + 4 d^{3} e^{3} x + 2 d^{2} e^{4} x^{2}} - \frac {b d^{3} g n}{2 d^{4} e^{2} + 4 d^{3} e^{3} x + 2 d^{2} e^{4} x^{2}} - \frac {b d^{2} e f n \log {\left (\frac {d}{e} + x \right )}}{2 d^{4} e^{2} + 4 d^{3} e^{3} x + 2 d^{2} e^{4} x^{2}} + \frac {b d^{2} e f n}{2 d^{4} e^{2} + 4 d^{3} e^{3} x + 2 d^{2} e^{4} x^{2}} - \frac {2 b d^{2} e g n x \log {\left (\frac {d}{e} + x \right )}}{2 d^{4} e^{2} + 4 d^{3} e^{3} x + 2 d^{2} e^{4} x^{2}} - \frac {b d^{2} e g n x}{2 d^{4} e^{2} + 4 d^{3} e^{3} x + 2 d^{2} e^{4} x^{2}} + \frac {2 b d e^{2} f n x \log {\relax (x )}}{2 d^{4} e^{2} + 4 d^{3} e^{3} x + 2 d^{2} e^{4} x^{2}} - \frac {2 b d e^{2} f n x \log {\left (\frac {d}{e} + x \right )}}{2 d^{4} e^{2} + 4 d^{3} e^{3} x + 2 d^{2} e^{4} x^{2}} + \frac {b d e^{2} f n x}{2 d^{4} e^{2} + 4 d^{3} e^{3} x + 2 d^{2} e^{4} x^{2}} + \frac {2 b d e^{2} f x \log {\relax (c )}}{2 d^{4} e^{2} + 4 d^{3} e^{3} x + 2 d^{2} e^{4} x^{2}} + \frac {b d e^{2} g n x^{2} \log {\relax (x )}}{2 d^{4} e^{2} + 4 d^{3} e^{3} x + 2 d^{2} e^{4} x^{2}} - \frac {b d e^{2} g n x^{2} \log {\left (\frac {d}{e} + x \right )}}{2 d^{4} e^{2} + 4 d^{3} e^{3} x + 2 d^{2} e^{4} x^{2}} + \frac {b d e^{2} g x^{2} \log {\relax (c )}}{2 d^{4} e^{2} + 4 d^{3} e^{3} x + 2 d^{2} e^{4} x^{2}} + \frac {b e^{3} f n x^{2} \log {\relax (x )}}{2 d^{4} e^{2} + 4 d^{3} e^{3} x + 2 d^{2} e^{4} x^{2}} - \frac {b e^{3} f n x^{2} \log {\left (\frac {d}{e} + x \right )}}{2 d^{4} e^{2} + 4 d^{3} e^{3} x + 2 d^{2} e^{4} x^{2}} + \frac {b e^{3} f x^{2} \log {\relax (c )}}{2 d^{4} e^{2} + 4 d^{3} e^{3} x + 2 d^{2} e^{4} x^{2}} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)*(a+b*ln(c*x**n))/(e*x+d)**3,x)

[Out]

Piecewise((zoo*(-a*f/(2*x**2) - a*g/x - b*f*n*log(x)/(2*x**2) - b*f*n/(4*x**2) - b*f*log(c)/(2*x**2) - b*g*n*l
og(x)/x - b*g*n/x - b*g*log(c)/x), Eq(d, 0) & Eq(e, 0)), ((-a*f/(2*x**2) - a*g/x - b*f*n*log(x)/(2*x**2) - b*f
*n/(4*x**2) - b*f*log(c)/(2*x**2) - b*g*n*log(x)/x - b*g*n/x - b*g*log(c)/x)/e**3, Eq(d, 0)), ((a*f*x + a*g*x*
*2/2 + b*f*n*x*log(x) - b*f*n*x + b*f*x*log(c) + b*g*n*x**2*log(x)/2 - b*g*n*x**2/4 + b*g*x**2*log(c)/2)/d**3,
 Eq(e, 0)), (-a*d**3*g/(2*d**4*e**2 + 4*d**3*e**3*x + 2*d**2*e**4*x**2) - a*d**2*e*f/(2*d**4*e**2 + 4*d**3*e**
3*x + 2*d**2*e**4*x**2) - 2*a*d**2*e*g*x/(2*d**4*e**2 + 4*d**3*e**3*x + 2*d**2*e**4*x**2) - b*d**3*g*n*log(d/e
 + x)/(2*d**4*e**2 + 4*d**3*e**3*x + 2*d**2*e**4*x**2) - b*d**3*g*n/(2*d**4*e**2 + 4*d**3*e**3*x + 2*d**2*e**4
*x**2) - b*d**2*e*f*n*log(d/e + x)/(2*d**4*e**2 + 4*d**3*e**3*x + 2*d**2*e**4*x**2) + b*d**2*e*f*n/(2*d**4*e**
2 + 4*d**3*e**3*x + 2*d**2*e**4*x**2) - 2*b*d**2*e*g*n*x*log(d/e + x)/(2*d**4*e**2 + 4*d**3*e**3*x + 2*d**2*e*
*4*x**2) - b*d**2*e*g*n*x/(2*d**4*e**2 + 4*d**3*e**3*x + 2*d**2*e**4*x**2) + 2*b*d*e**2*f*n*x*log(x)/(2*d**4*e
**2 + 4*d**3*e**3*x + 2*d**2*e**4*x**2) - 2*b*d*e**2*f*n*x*log(d/e + x)/(2*d**4*e**2 + 4*d**3*e**3*x + 2*d**2*
e**4*x**2) + b*d*e**2*f*n*x/(2*d**4*e**2 + 4*d**3*e**3*x + 2*d**2*e**4*x**2) + 2*b*d*e**2*f*x*log(c)/(2*d**4*e
**2 + 4*d**3*e**3*x + 2*d**2*e**4*x**2) + b*d*e**2*g*n*x**2*log(x)/(2*d**4*e**2 + 4*d**3*e**3*x + 2*d**2*e**4*
x**2) - b*d*e**2*g*n*x**2*log(d/e + x)/(2*d**4*e**2 + 4*d**3*e**3*x + 2*d**2*e**4*x**2) + b*d*e**2*g*x**2*log(
c)/(2*d**4*e**2 + 4*d**3*e**3*x + 2*d**2*e**4*x**2) + b*e**3*f*n*x**2*log(x)/(2*d**4*e**2 + 4*d**3*e**3*x + 2*
d**2*e**4*x**2) - b*e**3*f*n*x**2*log(d/e + x)/(2*d**4*e**2 + 4*d**3*e**3*x + 2*d**2*e**4*x**2) + b*e**3*f*x**
2*log(c)/(2*d**4*e**2 + 4*d**3*e**3*x + 2*d**2*e**4*x**2), True))

________________________________________________________________________________________